package top.buluoluo.productservice.entity;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDateTime;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import top.buluoluo.productservice.enums.DiscountTypeMethod;
import top.buluoluo.productservice.enums.StatusMethod;
import top.buluoluo.productservice.enums.TargetTypeMethod;


/**
 * 商品折扣表(ProductDiscount)表实体类
 *
 * @author makejava
 * @since 2025-10-10 19:28:39
 */
@Data
public class ProductDiscount extends Model<ProductDiscount> {
//折扣ID
@TableId(type = IdType.AUTO)
    private BigInteger id;
//商户ID
    private BigInteger merchantId;
//折扣目标类型：SPU-商品SPU，SKU-商品SKU
    private TargetTypeMethod targetType;
//目标ID（SPU ID或SKU ID）
    private BigInteger targetId;
//折扣率（0.5表示5折）
    private BigDecimal discountRate;
//折扣类型：PERCENTAGE-百分比，FIXED-固定金额
    private DiscountTypeMethod discountType;
//最小购买数量
    private Long minQuantity;
//最大购买数量
    private Long maxQuantity;
//折扣开始时间
    private Date startTime;
//折扣结束时间
    private Date endTime;
//状态：ACTIVE-启用，INACTIVE-禁用，PENDING-待审核
    private StatusMethod status;
//创建人ID
    private BigInteger createdBy;
//更新人ID
    private BigInteger updatedBy;
//创建时间
    private LocalDateTime createdAt;
//更新时间
    private LocalDateTime updatedAt;

}

